package com.agent.platform.repository;

import com.agent.platform.entity.AgentSession;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Agent会话数据访问接口
 */
@Repository
public interface AgentSessionRepository extends JpaRepository<AgentSession, String> {

    Optional<AgentSession> findBySessionId(String sessionId);

    List<AgentSession> findByAgentId(String agentId);

    List<AgentSession> findByAgentIdAndStatus(String agentId, String status);

    Optional<AgentSession> findByAgentIdAndSessionId(String agentId, String sessionId);
}
